Package-level declarations

Types

Link copied to clipboard
data class AgenticTool(val definition: Tool.Definition, val metadata: Tool.Metadata = Tool.Metadata.DEFAULT, val llm: <Error class: unknown class> = LlmOptions(), val tools: List<Tool> = emptyList(), val systemPromptCreator: SystemPromptCreator = { defaultSystemPrompt(definition.description) }, val captureNestedArtifacts: Boolean = false) : Tool

An agentic tool that uses an LLM to orchestrate other tools.

Link copied to clipboard
fun interface ArtifactSink

Destination for captured artifacts from tool results.

Link copied to clipboard

Factory interface for creating artifact-sinking tool decorators. Extended by Tool.Companion to provide Tool.sinkArtifacts, Tool.publishToBlackboard, etc.

Link copied to clipboard
class ArtifactSinkingTool<T : Any>(val delegate: Tool, clazz: Class<T>, sink: ArtifactSink, filter: (T) -> Boolean = { true }, transform: (T) -> Any = { it }) : DelegatingTool

Tool decorator that captures artifacts from tool results, filters and transforms them, then sends to one or more sinks.

Link copied to clipboard

Sink that publishes artifacts to the current AgentProcess blackboard.

Link copied to clipboard

Sink that delegates to multiple sinks.

Link copied to clipboard

Tool decorator that executes the wrapped tool, then conditionally triggers replanning based on the result.

Link copied to clipboard
interface DelegatingTool : Tool

Interface for tool decorators that wrap another tool. Enables unwrapping to find the underlying tool implementation. Thus, it is important that tool wrappers implement this interface to allow unwrapping.

Link copied to clipboard
class ListSink(target: MutableList<Any> = mutableListOf()) : ArtifactSink

Sink that collects artifacts into a mutable list.

Link copied to clipboard

A tool that contains other tools, enabling progressive tool disclosure.

Link copied to clipboard

Factory interface for creating tools from annotated methods. Extended by Tool.Companion to provide Tool.fromMethod, Tool.fromInstance, etc.

Link copied to clipboard
data class ReplanContext(val result: Tool.Result, val agentProcess: AgentProcess, val tool: ToolInfo)

Context provided to ReplanDecider for making replanning decisions.

Link copied to clipboard
fun interface ReplanDecider

Functional interface for deciding whether to trigger replanning based on tool results.

Link copied to clipboard
data class ReplanDecision constructor(val reason: String, val blackboardUpdater: BlackboardUpdater = BlackboardUpdater {})

Decision returned by ReplanDecider to indicate whether replanning is needed.

Link copied to clipboard
class ReplanningTool constructor(val delegate: Tool, reason: String, blackboardUpdater: ReplanningToolBlackboardUpdater = ReplanningToolBlackboardUpdater { bb, content -> bb.addObject( content ) }) : DelegatingTool

Tool decorator that executes the wrapped tool, adds its result to the blackboard, then throws ReplanRequestedException to terminate the tool loop and trigger replanning.

Link copied to clipboard

Callback to update the blackboard with tool result content. Defined as a fun interface for Java interoperability.

Link copied to clipboard

Factory interface for creating replanning tool decorators. Extended by Tool.Companion to provide Tool.replanAlways, Tool.replanWhen, etc.

Link copied to clipboard
class Subagent : Tool

A Tool that delegates to another agent as a subagent/handoff.

Link copied to clipboard

Create a system prompt given the current AgentProcess as context.

Link copied to clipboard
interface Tool : ToolInfo

Framework-agnostic tool that can be invoked by an LLM. Adapters in SPI layer bridge to Spring AI ToolCallback or LangChain4j ToolSpecification/ToolExecutor.

Link copied to clipboard

Marker interface for exceptions that represent control flow signals rather than errors. These exceptions are allowed to propagate through TypedTool.call without being caught and converted to error results.

Link copied to clipboard
interface ToolInfo

Tool information including definition and metadata, without execution logic.

Link copied to clipboard
data class ToolObject(val objects: List<Any>, val namingStrategy: StringTransformer = StringTransformer.Companion.IDENTITY, val filter: (String) -> Boolean = { true })

Holds one or more annotated tool objects. Adds a naming strategy and a filter to the overall object.

Link copied to clipboard

InputSchema implementation that generates JSON schema from a Class type. Uses reflection to extract properties and their types.

Link copied to clipboard
open class TypedTool<I : Any, O : Any>(name: String, description: String, inputType: Class<I>, outputType: Class<O>, val metadata: Tool.Metadata = Tool.Metadata.DEFAULT, objectMapper: <Error class: unknown class> = jacksonObjectMapper(), function: Function<I, O>) : Tool

Tool with strongly typed input and output. Handles JSON marshaling automatically, allowing you to work with domain objects directly.

Link copied to clipboard

Factory interface for creating strongly typed tools. Extended by Tool.Companion to provide Tool.fromFunction methods.

Functions

Link copied to clipboard
inline fun <I : Any, O : Any> TypedToolFactory.fromFunction(name: String, description: String, metadata: Tool.Metadata = Tool.Metadata.DEFAULT, objectMapper: <Error class: unknown class> = jacksonObjectMapper(), noinline function: (I) -> O): Tool

Kotlin-friendly extension for creating typed tools with reified type parameters.